import pandas
import yaml,json,csv

def read_yaml(filename):
    with open(filename,encoding='utf-8') as f:
        return yaml.safe_load(f)

def read_json(filename):
    with open(filename, 'r', encoding='utf-8') as f:
        return json.load(f)

def read_excel(filename):
    df=pandas.read_excel(filename)
    data=df.to_dict('records')
    return data


def read_csv(filename):
    data = []
    with open(filename, 'r', encoding='utf-8') as f:
        reader = csv.DictReader(f)
        for row in reader:
            data.append(row)
    return data